package com.bj58.ecdata.calc.dbservice.dao.model;

import java.io.Serializable;

import com.bj58.ecdata.calc.dbservice.dao.annotation.AccZSetDimension;
import com.bj58.ecdata.calc.dbservice.dao.annotation.DailyMultiDimensionAccValueMap;
import com.bj58.ecdata.calc.dbservice.dao.annotation.HourlyMultiDimensionAccValueMap;
import com.bj58.ecdata.calc.dbservice.dao.annotation.MapDimension;
import com.bj58.ecdata.calc.dbservice.dao.annotation.MultiDimensionAccValueMap;
import com.bj58.ecdata.calc.dbservice.dao.annotation.PrimaryDimension;
import com.bj58.ecdata.calc.dbservice.dao.annotation.TableName;

/**
 * @author lichao
 *
 */
@TableName("click")
public class ClickModel implements Serializable {
	private static final long serialVersionUID = 1L;
	@PrimaryDimension
	private Long time;
	private Integer platform;
	private String bussline;
	@MultiDimensionAccValueMap(dimensions = { "platform", "bussline" })
	@HourlyMultiDimensionAccValueMap(dimensions = { "platform", "bussline" })
	private Long pv;
	@MultiDimensionAccValueMap(dimensions = { "platform", "bussline" })
	@HourlyMultiDimensionAccValueMap(dimensions = { "platform", "bussline" })
	@DailyMultiDimensionAccValueMap(dimensions = { "platform", "bussline" })
	private Long cash;
	@MultiDimensionAccValueMap(dimensions = { "platform", "bussline" })
	@HourlyMultiDimensionAccValueMap(dimensions = { "platform", "bussline" })
	@DailyMultiDimensionAccValueMap(dimensions = { "platform", "bussline" })
	private Long cost;
	
	private Long custNum;
	@MapDimension(cacheKey = "city1Name", cacheValue = "pv")
	private Integer cityType;

	private Integer city1Id;
	@AccZSetDimension(cacheValue = "cash")
	private String city1Name;

	private String cate2Id;

	@AccZSetDimension(cacheValue = "cash")
	private String cate2Name;

	/**
	 * @return the time
	 */
	public Long getTime() {
		return time;
	}

	/**
	 * @param time
	 *            the time to set
	 */
	public void setTime(Long time) {
		this.time = time;
	}

	/**
	 * @return the platform
	 */
	public Integer getPlatform() {
		return platform;
	}

	/**
	 * @param platform
	 *            the platform to set
	 */
	public void setPlatform(Integer platform) {
		this.platform = platform;
	}

	/**
	 * @return the bussline
	 */
	public String getBussline() {
		return bussline;
	}

	/**
	 * @param bussline
	 *            the bussline to set
	 */
	public void setBussline(String bussline) {
		this.bussline = bussline;
	}

	/**
	 * @return the pv
	 */
	public Long getPv() {
		return pv;
	}

	/**
	 * @param pv
	 *            the pv to set
	 */
	public void setPv(Long pv) {
		this.pv = pv;
	}

	/**
	 * @return the cash
	 */
	public Long getCash() {
		return cash;
	}

	/**
	 * @param cash
	 *            the cash to set
	 */
	public void setCash(Long cash) {
		this.cash = cash;
	}

	/**
	 * @return the cost
	 */
	public Long getCost() {
		return cost;
	}

	/**
	 * @param cost
	 *            the cost to set
	 */
	public void setCost(Long cost) {
		this.cost = cost;
	}

	/**
	 * @return the custNum
	 */
	public Long getCustNum() {
		return custNum;
	}

	/**
	 * @param custNum
	 *            the custNum to set
	 */
	public void setCustNum(Long custNum) {
		this.custNum = custNum;
	}

	/**
	 * @return the cityType
	 */
	public Integer getCityType() {
		return cityType;
	}

	/**
	 * @param cityType
	 *            the cityType to set
	 */
	public void setCityType(Integer cityType) {
		this.cityType = cityType;
	}

	/**
	 * @return the city1Id
	 */
	public Integer getCity1Id() {
		return city1Id;
	}

	/**
	 * @param city1Id
	 *            the city1Id to set
	 */
	public void setCity1Id(Integer city1Id) {
		this.city1Id = city1Id;
	}

	/**
	 * @return the city1Name
	 */
	public String getCity1Name() {
		return city1Name;
	}

	/**
	 * @param city1Name
	 *            the city1Name to set
	 */
	public void setCity1Name(String city1Name) {
		this.city1Name = city1Name;
	}

	/**
	 * @return the cate2Id
	 */
	public String getCate2Id() {
		return cate2Id;
	}

	/**
	 * @param cate2Id
	 *            the cate2Id to set
	 */
	public void setCate2Id(String cate2Id) {
		this.cate2Id = cate2Id;
	}

	/**
	 * @return the cate2Name
	 */
	public String getCate2Name() {
		return cate2Name;
	}

	/**
	 * @param cate2Name
	 *            the cate2Name to set
	 */
	public void setCate2Name(String cate2Name) {
		this.cate2Name = cate2Name;
	}

	@Override
	public String toString() {
		return String
				.format("ClickModel [time=%s, platform=%s, bussline=%s, pv=%s, cash=%s, cost=%s, custNum=%s, cityType=%s, city1Id=%s, city1Name=%s, cate2Id=%s, cate2Name=%s]",
						time, platform, bussline, pv, cash, cost, custNum, cityType, city1Id, city1Name, cate2Id, cate2Name);
	}

}
